from Base.Base import Base
from selenium.webdriver.common.by import By
import time



class Page2(Base):

    # 点击客户列表页面
    click_user_loc = (By.XPATH, '/html/body/div[1]/div/section/aside/ul/li[2]/ul/li[2]')
    def click_user(self):
        self.click(self.click_user_loc)

    # 点击分页
    click_fenye_loc = (By.XPATH, '/html/body/div[1]/div/section/section/main/div[2]/ul/li[1]')
    def click_fenye(self):
        self.click(self.click_fenye_loc)

    # 点击添加按钮
    click_add_loc = (By.XPATH, '/html/body/div[1]/div/section/section/main/form/div/div[2]/div/div/button[2]/span')
    def click_add(self):
        self.click(self.click_add_loc)

    # 输入客户名
    send_name_loc = (By.XPATH, '/html/body/div[1]/div/section/section/main/form/div[1]/div/div[1]/div/input')
    def send_name(self):
        self.send_keys(self.send_name_loc, '张三')

    # 点击提交按钮
    click_tj_loc = (By.XPATH, '/html/body/div[1]/div/section/section/main/form/div[6]/div/button[1]/span')
    def click_tj(self):
        self.click(self.click_tj_loc)






